import service from '@/utils/request'


export const unitApi = (id: number) => {
	return service.get('/new/new/unit/' + id)
}

export const unitListApi = () => {
	return service.get('/new/new/unit/allList')
}

export const unitSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.put('/new/new/unit', dataForm)
	} else {
		return service.post('/new/new/unit', dataForm)
	}
}

export const buildingUnitListApi = (data: any) => {
	return service.post('/new/new/unit/buildingUnit', data)
}


